package com.example.zlw.dem25;

import java.util.ArrayList;

/**
 * @program: Zlw
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-11-09 22:36
 **/
public class HeiZhu implements Pig{
    private String msg;
    private  ArrayList<News>  list=new ArrayList<>();
    @Override
    public  void Xinwen(News news) {
        list.add(news);
    }

    @Override
    public  void delete(News news) {
        list.remove(news);
    }

    @Override
    public  void setMsg(String msg) {
        this.msg=msg;
    }

    @Override
    public  void qun() {
        for (News news : list) {
            news.getMsg(msg);
        }
    }

}
